import { UseInterceptors } from "@nestjs/common";
import { SerializeInterceptor } from "../interceptors/serialize.interceptor";

interface ClassContructor<T> {
  new (...args: any[]): T;
}

export function Serialize(dto: ClassContructor<any>) {
  return UseInterceptors(new SerializeInterceptor(dto));
}
